package com.chuan.it_market.consts;

public class GoodsConsts {
    public static final String NO_UPLOAD_IMG ="/images/index/logo.png";
    public static final Double AREA_RANGE=5.0;
    public static final String YES="YES";
    public static final String NO="NO";
    public static final String WINDOW_UPLOAD_PATH="C:\\";
    public static final String LINUX_UPLOAD_PATH="/";
    public static final String WINDOW_CONFIG_UPLOAD_PATH="file:C:\\upload\\";

    public static final String LINUX_CONFIG_UPLOAD_PATH="file:/upload/";

    public static String getConfigUploadPath(){

        String realPath=GoodsConsts.LINUX_CONFIG_UPLOAD_PATH;
        String SystemType=System.getProperty("os.name");
        if(SystemType.toLowerCase().contains("windows")){
            realPath=GoodsConsts.WINDOW_CONFIG_UPLOAD_PATH;
        }
        return realPath;
    }
    public static String getUploadPath(){
        String realpath=GoodsConsts.LINUX_UPLOAD_PATH;
        String systemtype=System.getProperty("os.name");
        if(systemtype.toLowerCase().contains("windows")){
            realpath=GoodsConsts.WINDOW_UPLOAD_PATH;
        }
        return realpath;
    }
}
